<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img{
            position: absolute;
        }
    </style>
</head>
<body>
    <img src="./images/天使.png" alt="">
    <script>
        var img = document.querySelector('img');
        document.addEventListener('mousemove',function(e){
            //添加px 100 97
            var x = e.pageX -100 + 'px';
            var y = e.pageY -97 + 'px';
            // console.log(x,y);
            img.style.left = x;
            img.style.top = y;
        })
    </script>
</body>
</html>